<template>
	<div class="body">
		<!-- <div class="head">
			<img @click="returnGo" src="../assets/homeimg/滑动左.png" />
			<span>系统消息</span>
		</div> -->
		<ul>
			<li class="min" v-for="item in list" :key="item.id">
				<div class="time"><span>{{item.createtime_text}}</span></div>
				<div class="mintop" @click="detail(item.id)">
					<div class="navimg">
						<img :src="item.image" alt="" />
					</div>
					<div class="tis">
						<div>{{item.name}}</div>
						<p>查看详情</p>
					</div>
				</div>
			</li>
		</ul>

	</div>
</template>
<script>
	import mineApi from "@/api/mine";
	export default {
		data() {
			return {
				list: []
			};
		},
		components: {
			// [Image.name]: Image
		},
		created() {
			this.getsystem()
		},
		methods: {
			returnGo() {
				// this.$router.go(-1);
				window.webkit.messageHandlers.pageBack_js_oc.postMessage([])
			},
			getsystem() {
				mineApi.system({limit:10000}).then(res => {
					console.log(res);
					this.list = res.data.data;
				})
			},
			detail(id) {
				this.$router.push({
					name: "newsdetail",
					params: {
						id
					}
				})
			}
		}
	};
</script>
<style lang="scss" scoped="scoped">
	.body {
		height: 100%;
		background: #fafafa;
	}

	.head {
		text-align: center;
		position: relative;
		height: 2.75rem;
		line-height: 2.75rem;
		// padding-top: 1.25rem;
		color: #333333;
		font-size: 1.25rem;
		border-bottom: 1px solid #dcdcdc;
		background: #fff;

		img {
			width: 0.625rem;
			height: 1.125rem;
			position: absolute;
			left: 1rem;
			bottom: 0.75rem;
		}
	}

	// 在scss文件中
	@supports(bottom:constant(safe-area-inset-top)) {

		// 如果存在底部安全区域
		.head {
			padding-top: constant(safe-area-inset-top);

		}

	}

	@supports(bottom:env(safe-area-inset-top)) {

		// 如果存在底部安全区域
		.head {
			padding-top: env(safe-area-inset-top);

		}

	}

	.min {
		width: 92vw;
		margin: 0 auto;

		.mintop {
			// height: 13.75rem;
			background: #fff;
		}

		.time {
			height: 2.375rem;
			line-height: 2.375rem;
			color: #666666;
			font-size: 0.75rem;
			text-align: center;
		}

		.navimg img {
			width: 100%;
			height: 10rem;
		}

		.tis {
			margin-left: 0.625rem;

			div{
				font-size:15px;
				font-family:Adobe Heiti Std;
				font-weight:normal;
				color:rgba(51,51,51,1);
				overflow: hidden;
				text-overflow: ellipsis;
				display:-webkit-box; //作为弹性伸缩盒子模型显示。
				-webkit-box-orient:vertical; //设置伸缩盒子的子元素排列方式--从上到下垂直排列
				-webkit-line-clamp:2;
			}

			p{
				color: #666666;
				font-size: 12px;
				margin-top: 10px;
			}
		}
	}
</style>
